def yanghuisanjiao(n):
    sanjiao1=[]
    for i in range(n):
        sanjiao2=[]
        for x in range(i+1):
            if x==i or x==0:
                sanjiao2.append("1")
            else:
                if x<i and x!=i:
                    sanjiao2.append(str(int(sanjiao1[x])+int(sanjiao1[x-1])))
        print(" ".join(sanjiao2).center(40))
        sanjiao1=sanjiao2

n=int(input())
yanghuisanjiao(n)

